package com.wangsd.web.coupon.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 服务商配置
 */
@Data
@Entity
@Table(name = "service_business")
@ApiModel(value = "服务商", description = "服务商")
public class ServiceBusiness implements Serializable {

    @ApiModelProperty(value = "id")
    /*mybatis plus 自增主键*/
    @TableId(type = IdType.AUTO)
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createdTime;

    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updatedTime;

    @ApiModelProperty(value = "（逻辑删除）是否已删；0，未删，1，已删")
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer deleted;


    @ApiModelProperty(value = "服务商对应的公众号appid")
    private String appId;

    @ApiModelProperty(value = "微信支付商户号")
    private String mchId;

    @ApiModelProperty(value = "微信支付商户密钥")
    private String mchKey;

    @ApiModelProperty(value = "p12证书的位置，可以指定绝对路径，也可以指定类路径（以classpath:开头）")
    private String keyPath;

    @ApiModelProperty(value = "服务商名称")
    private String name;

    @ApiModelProperty(value = "检索标识")
    private String code;

    @ApiModelProperty(value = "商户证书序列号")
    private String mchSerialNo;

    @ApiModelProperty(value = "api密钥")
    @Column(name = "api_v3_key")
    private String apiV3Key;

    @ApiModelProperty(value = "你的商户私钥")
    @Column(name = "private_key",columnDefinition = "varchar(2000)")
    private String privateKey;
}
